<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVTypeLibrary: Interface ICoreWebView2WebResourceResponse</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICoreWebView2WebResourceResponse"></span><h1 class="cio">Interface ICoreWebView2WebResourceResponse</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVTypeLibrary.html">uWVTypeLibrary</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICoreWebView2WebResourceResponse = interface(IUnknown)</code></p>
<h2 class="description">Description</h2>
<p>
 An HTTP response used with the WebResourceRequested event. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2webresourceresponse">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2webresourceresponse</a>&quot;&gt;See the ICoreWebView2WebResourceResponse article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IUnknown</li>
<li class="thisitem">ICoreWebView2WebResourceResponse</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Get_Content-IStream-">Get_Content</a></strong>(out Content: IStream): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Set_Content-IStream-">Set_Content</a></strong>(const Content: IStream): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Get_Headers-ICoreWebView2HttpResponseHeaders-">Get_Headers</a></strong>(out Headers: <a href="uWVTypeLibrary.ICoreWebView2HttpResponseHeaders.html">ICoreWebView2HttpResponseHeaders</a>): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Get_StatusCode-SYSINT-">Get_StatusCode</a></strong>(out StatusCode: SYSINT): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Set_StatusCode-SYSINT-">Set_StatusCode</a></strong>(StatusCode: SYSINT): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Get_ReasonPhrase-PWideChar-">Get_ReasonPhrase</a></strong>(out ReasonPhrase: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2WebResourceResponse.html#Set_ReasonPhrase-PWideChar-">Set_ReasonPhrase</a></strong>(ReasonPhrase: PWideChar): HResult; stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_Content-IStream-"></span><code>function <strong>Get_Content</strong>(out Content: IStream): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 HTTP response content as stream. Stream must have all the content data available by the time the `WebResourceRequested` event deferral of this response is completed. Stream should be agile or be created from a background thread to prevent performance impact to the UI thread. `Null` means no content data. `IStream` semantics apply (return `S_OK` to `Read` runs until all data is exhausted). When providing the response data, you should consider relevant HTTP request headers just like an HTTP server would do. For example, if the request was for a video resource in a HTML video element, the request may contain the [Range](<a href="https://developer.mozilla.org/docs/Web/HTTP/Headers/Range">https://developer.mozilla.org/docs/Web/HTTP/Headers/Range</a>) header to request only a part of the video that is streaming. In this case, your response stream should be only the portion of the video specified by the range HTTP request headers and you should set the appropriate [Content-Range](<a href="https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Range">https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Range</a>) header in the response. </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
  <dt>GUID['{AAFCC94F-FA27-48FD-97DF-830EF75AAEC9}']</dt>
  <dd></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_Content-IStream-"></span><code>function <strong>Set_Content</strong>(const Content: IStream): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `Content` property. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_Headers-ICoreWebView2HttpResponseHeaders-"></span><code>function <strong>Get_Headers</strong>(out Headers: <a href="uWVTypeLibrary.ICoreWebView2HttpResponseHeaders.html">ICoreWebView2HttpResponseHeaders</a>): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Overridden HTTP response headers. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_StatusCode-SYSINT-"></span><code>function <strong>Get_StatusCode</strong>(out StatusCode: SYSINT): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The HTTP response status code. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_StatusCode-SYSINT-"></span><code>function <strong>Set_StatusCode</strong>(StatusCode: SYSINT): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `StatusCode` property. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_ReasonPhrase-PWideChar-"></span><code>function <strong>Get_ReasonPhrase</strong>(out ReasonPhrase: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The HTTP response reason phrase.

<p>The caller must free the returned string with `CoTaskMemFree`. See [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Set_ReasonPhrase-PWideChar-"></span><code>function <strong>Set_ReasonPhrase</strong>(ReasonPhrase: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Sets the `ReasonPhrase` property. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
